<div class="bg_greenyellow round_10 quarter shadow_in_0">
    <ul class="rightmenu">
        <li><a href="<?php echo $this->url(array('action'=>'index','controller'=>'commodities','module'=>'admin'),null,true); ?>">Towary</a></li>
        <li><a href="<?php echo $this->url(array('action'=>'categories','controller'=>'commodities','module'=>'admin'),null,true); ?>">Kategorie</a></li>
        <li><a href="<?php echo $this->url(array('action'=>'types','controller'=>'commodities','module'=>'admin'),null,true); ?>">Słownik</a></li>
        <li><a href="<?php echo $this->url(array('action'=>'periods','controller'=>'commodities','module'=>'admin'),null,true); ?>">Terminy Dostaw</a></li>
    </ul>    
</div>
    
    
<div class="threequarter  vpad_10 last fixed">
    

     
    <h6 class ="bg_mediumblue round_5 shadow_out_4">Stan</h6>
    <br />

    
    <table class="plain" width="100%">
        <?php if(!empty($this->categories)){?>
                <caption>
                  Kategorie towarów
               </caption>
               <thead>
                  <tr>
                     <th>#</th>
                     <th scope="col">Nazwa</th>
                     <th scope="col"></th>
                     <th scope="col"></th>
                     <th scope="col"></th>
                  </tr>
               </thead>
               <tfoot>
                  <tr>
                     <th>&nbsp;</th>
                     <td>&nbsp;</td>

                     <td>&nbsp;</td>
                     <td>&nbsp;</td>
                     <td>&nbsp;</td>
                  </tr>
               </tfoot>
               
        <?php } else { 
               echo '<div class="warning"><p>Dodaj kategorię</p><div></div></div>';
        } ?>
   <tbody>

      <?php foreach ($this->categories as $category) {?>
    
          <tr>
             <th scope="row"><?php echo $category->getCategory_id();?></th>
             <td><?php echo $category->getName();?></td>
             <td><a class="edit_button grey styled_button" href='<?php echo $this->url(array('action'=>'edit-category','controller'=>'commodities','module'=>'admin','id'=>$category->getCategory_id()),null,true); ?>'>Edytuj</a></td>
             <td><a class="delete_button grey styled_button" href='<?php echo $this->url(array('action'=>'delete-Category','controller'=>'commodities','module'=>'admin','id'=>$category->getCategory_id()),null,true); ?>'>Usuń</a></td>
             <td><a class="view_button grey styled_button" href='<?php echo $this->url(array('action'=>'types','controller'=>'commodities','module'=>'admin','cat'=>$category->getCategory_id()),null,true); ?>'>Przeglądaj</a></td>
          </tr> 
   
    
    <?php };?>

   </tbody>
</table>

    <h6 class ="bg_mediumblue round_5 shadow_out_4">Nowa kategoria</h6>
    <br />
    <?php echo $this->form; ?>
    
</div>